<template>
  <basic-container>
    <qc-bad-handling :tableOption="option" :dialogColumn="dialogColumn" :queryParams="queryParams"></qc-bad-handling>
  </basic-container>
</template>

<script>
import QcBadHandling from '@/components/qc-bad-handling/qc-bad-handling.vue';

export default {
  components: {
    QcBadHandling
  },
  data() {
    return {
      queryParams: {
        documentType: 'IPQC',
        examineResult: 'NG' //TODO 需要查询所有NG的为不良检验单
      },
      option: {
        height: 'calc(100vh - 440px)',
        calcHeight: 30,
        tip: false,
        searchShow: true,
        border: true,
        index: true,
        indexLabel: '序号',
        viewBtn: false,
        // 操作栏不展示
        menu: false,
        addBtn: false,
        delBtn: false,
        editBtn: false,
        selection: true,
        dialogClickModal: false,
        searchMenuSpan: 3,
        searchMenuPosition: 'right',
        column: [
          {
            label: '检验单号',
            prop: 'documentNo',
            search: true,
            searchOrder: 2,
            searchSpan: 5,
            width: 140 //列宽度
          },
          {
            label: '工单号',
            prop: 'sourceNo',
            search: true,
            searchOrder: 1,
            searchSpan: 5
          },
          {
            label: '工序',
            prop: 'routeName'
          },
          {
            label: '车间',
            prop: 'workshopName'
          },
          {
            label: '产线',
            prop: 'lineName'
          },
          {
            label: '巡检时段',
            prop: 'ipqcTimeframe'
          },
          {
            label: '产品编码',
            prop: 'partNo',
            searchOrder: 3,
            search: true,
            searchSpan: 5
          },
          {
            label: '产品名称',
            prop: 'partName'
          },
          {
            label: '产品规格',
            prop: 'partModel'
          },
          {
            label: '检验数量',
            prop: 'examineQuantity'
          },
          // {
          //   label: '不良总数',
          //   prop: 'ngQuantity'
          // },
          {
            label: '检验人员',
            prop: 'examineByName'
          },
          {
            label: '检验日期',
            prop: 'examineDate',
            search: true,
            searchOrder: 4,
            searchSpan: 6,
            type: 'date',
            searchType: 'daterange',
            format: 'yyyy-MM-dd',
            valueFormat: 'yyyy-MM-dd',
            startPlaceholder: '开始日期',
            endPlaceholder: '结束日期'
          },
          {
            label: '报验人员',
            prop: 'sendExamineByName'
          },
          {
            label: '报验日期',
            prop: 'sendExamineDate',
            type: 'date',
            searchType: 'daterange',
            format: 'yyyy-MM-dd',
            valueFormat: 'yyyy-MM-dd',
            startPlaceholder: '开始日期',
            endPlaceholder: '结束日期'
          }
        ]
      },
      dialogColumn: [
        {
          label: '产品序列号',
          prop: 'productSequenceNumber'
        },
        {
          label: '不良产生工序',
          width: 120,
          prop: 'routeName'
        },
        {
          label: '不良代码',
          prop: 'failureCode'
        },
        {
          label: '不良现象描述',
          prop: 'failureName'
        },
        {
          label: '工单号',
          prop: 'workOrderNo'
        },
        {
          label: '车间',
          prop: 'workshopName'
        },
        {
          label: '产线',
          prop: 'lineName'
        },
        {
          label: '产品编码',
          prop: 'partNo'
        },
        {
          label: '产品名称',
          prop: 'partName'
        },
        {
          label: '产品型号',
          prop: 'partModel'
        }
      ]
    };
  },
  computed: {},
  mounted() {},
  methods: {}
};
</script>

<style scoped lang="scss"></style>
